package com.panda.game.xls.component;

import com.panda.game.xls.constant.ScreenConstant;

import javax.swing.*;
import javax.swing.table.TableModel;
import java.awt.*;

public class MyJTable extends JTable {

    public MyJTable() {
        super();
        setDefaultSeting();
    }

    public MyJTable(Object[][] rowData, Object[] columnNames) {
        super(rowData, columnNames);
        setDefaultSeting();
    }

    public MyJTable(TableModel dm) {
        super(dm);
        setDefaultSeting();
    }

    protected void setDefaultSeting() {
        Dimension preferredSize = new Dimension(ScreenConstant.SCREEN_WIDTH_HALF, ScreenConstant.SCREEN_HEIGHT);
        setPreferredSize(preferredSize);
        setRowHeight(25);
    }


}
